package com.lansea.wms.model;


import com.lansea.wms.entity.ValidClass;
import com.lansea.wms.model.base.BaseUser;
import com.lansea.wms.validate.CodeValidate;
import com.lansea.wms.validate.NameValidate;
import com.lansea.wms.validate.RemarkValidate;
import lombok.Data;
import org.springframework.stereotype.Repository;

import javax.validation.constraints.Min;
@Data
@Repository
public class Stock extends BaseUser {

    @Min(value = 1, message = "id 非法", groups = {ValidClass.EditForm.class})
    private Integer id;

    @CodeValidate
    private String code;

    @NameValidate
    private String name;

    @Min(value = 1, message = "请选择仓库")
    private Integer warehouseId;

    @Min(value = 1, message = "请选择库区")
    private Integer reservoirId;

    @RemarkValidate
    private String remark;

    private String warehouseName;
    private String reservoirName;



}
